-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resizing authoring on widget pin, allow for a secondary widget #4676
Conversation
@tomaskikutis could you check the code |
yep, it's on my list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we talked about before - I'm thinking whether I didn't previously request the opposite. I think it'd be better to have this behavior as a part of authoring-react component so if it's used somewhere else it would work out of the box without having to re-implement it via a wrapper.
@@ -216,7 +216,7 @@ class CommentsWidget<T> extends React.PureComponent<IProps<T>, IState> { | |||
text="post" | |||
type="primary" | |||
onClick={this.save} | |||
disabled={this.state.newCommentMessage.length < 1} | |||
disabled={this.state.newCommentMessage?.length < 1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't compare undefined to a number. Stricter compiler options wouldn't allow it.
scripts/apps/authoring-react/article-widgets/find-and-replace.tsx
Outdated
Show resolved
Hide resolved
@@ -114,11 +114,11 @@ export class VersionsTab extends React.PureComponent<IArticleSideWidgetComponent | |||
|
|||
compareAuthoringEntities({ | |||
item1: { | |||
label: gettext('version {{n}}', {n: from._current_version}), | |||
label: gettext('version {{n}}', {n: from?._current_version}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't output a string with pieces missing to the UI - which would happen since you use optional chaining without a fallback.
Current version is mandatory, not sure why are you applying optional chaining all over the place here.
SDESK-7343
SDESK-7344